---
layout: "default"
title: "fatalError"
description: "Swift documentation for 'fatalError': Unconditionally print a message and stop execution."
keywords: "fatalError,func,swift,documentation"
root: "/v2.2"
---

<div class="declaration" id="func-fatalerror_-string-file_-staticstring-line_-uint">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-fatalerror_-string-file_-staticstring-line_-uint">@noreturn  func fatalError(<wbr>_: (<wbr>) -&gt; String, file:<wbr> StaticString, line: UInt)</a>
        
<div class="comment collapse" id="comment-func-fatalerror_-string-file_-staticstring-line_-uint"><div class="p">
    <p>Unconditionally print a <code>message</code> and stop execution.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">@noreturn  func fatalError(@autoclosure message: () -&gt; String = default, file: StaticString = #file, line: UInt = #line)</code>
    
    
</div></div>
</div>
